package thread;

/**
 * java中所有的代码都是靠线程运行的，main也不例外。执行main方法的线程称为“主线程”
 */
public class CurrentThreadDemo {
    public static void main(String[] args) {
        Thread m = Thread.currentThread();
        System.out.println("主线程："+m);
        dosome();
    }
    public static void dosome (){
        Thread t = Thread.currentThread();
        System.out.println("运行dosome方法的线程是："+t);
    }


}
